﻿using System;

namespace Mads.CoreDomain
{
  /// <summary>
  /// Represents seasonal ticket price multiplier.
  /// </summary>
  public class SeasonPrice : VersionedKeyAbstraction
  {
    /// <summary>
    /// Start of the period when multiplier holds.
    /// </summary>
    public DateTime StartDate { get; set; }

    /// <summary>
    /// End of the period when multiplier holds.
    /// </summary>
    public DateTime EndDate { get; set; }

    /// <summary>
    /// Ticket price multplier for the period.
    /// </summary>
    public float PriceMultiplier { get; set; }

    public SeasonPrice(DateTime startDate, DateTime endDate,
      float priceMultiplier)
    {
      if (priceMultiplier <= 0)
      {
        throw new ArgumentException("priceMultiplier");
      }

      StartDate = startDate;
      EndDate = endDate;
      PriceMultiplier = priceMultiplier;
    }
  }
}